<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:wpf="clr-namespace:MaterialDesignThemes.Wpf;assembly=MaterialDesignThemes.Wpf">

  <Style TargetType="{x:Type ToolTip}" x:Key="MaterialDesignToolTip">
    <Setter Property="Foreground" Value="{DynamicResource MaterialDesignToolTip}" />
    <Setter Property="Background" Value="{DynamicResource MaterialDesignToolTipBackground}" />
    <Setter Property="Padding" Value="8" />
    <Setter Property="Placement" Value="Custom" />
    <Setter Property="CustomPopupPlacementCallback" Value="{x:Static wpf:ToolTipAssist.CustomPopupPlacementCallback}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ToolTip}">
          <Border Background="{TemplateBinding Background}" CornerRadius="2" Margin="{TemplateBinding Margin}">
            <ContentPresenter x:Name="ContentPresenter"
                              Margin="{TemplateBinding Padding}"
                              Content="{TemplateBinding ContentControl.Content}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}">
            </ContentPresenter>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <Style x:Key="{x:Type ToolTip}" BasedOn="{StaticResource MaterialDesignToolTip}" TargetType="{x:Type ToolTip}" />

</ResourceDictionary>
